<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?php
//ket noi db server
$db=mysql_connect("localhost","root","");
if(!$db)
{
	echo "Can not connect to db server!";
	exit;
}
//Chon csdl
mysql_select_db("ql_ban_sua");
//Luu ket qua truy van
$result=mysql_query("select * from hang_sua");
//neu bien result co du lieu
if(mysql_num_rows($result)!=0)
{
	echo "<table width='70%' border='1' align='center' cellpadding='0' cellspacing='0'>
	  <caption>
		THÔNG TIN HÃNG SỮA
	  </caption>
	  <tr>
		<th scope='col'>Mã HS</th>
		<th scope='col'>Tên hãng sữa</th>
		<th scope='col'>Địa chỉ</th>
		<th scope='col'>Điện thoại</th>
		<th scope='col'>Email</th>
	  </tr>";
	  while($row=mysql_fetch_row($result))
	  {
		$maHS=$row[0];
		$tenHS=$row[1];
		$diaChi=$row[2];
		$dienThoai=$row[3];
		$email=$row[4];
		
		echo "<tr>	<td>$maHS</td>
		<td>$tenHS</td>
		<td>$diaChi</td>
		<td>$dienThoai</td>
		<td>$email</td>	  </tr>";
	  }
	  
	echo "</table>";
}
?>
<body>
</body>
</html>